﻿<UserControl
			 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
			 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
			 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
			 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
			 xmlns:local="clr-namespace:Licenta3"
			 xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" x:Name="userControl" x:Class="Anexa1View" 
			 mc:Ignorable="d" Width="400" Height="680" Background="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}">
	<UserControl.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="/Licenta3;component/Simple Styles.xaml"/>
			</ResourceDictionary.MergedDictionaries>
			<local:Anexa1ViewModel x:Key="Anexa1ViewModelDataSource" d:IsDataSource="True"/>
		</ResourceDictionary>
	</UserControl.Resources>
	<UserControl.DataContext>
		<Binding Source="{StaticResource Anexa1ViewModelDataSource}"/>
	</UserControl.DataContext>
	<ScrollViewer VerticalScrollBarVisibility="Auto" VerticalAlignment="Top">
	<Grid x:Name="grid" Height="680">
		<Grid.ColumnDefinitions>
			<ColumnDefinition x:Name="Labels" Width="145*"/>
			<ColumnDefinition x:Name="Inputs" Width="186*"/>
		</Grid.ColumnDefinitions>
		<UniformGrid x:Name="uniformGrid" Rows="22" Grid.IsSharedSizeScope="True">
			<TextBlock TextWrapping="Wrap" Margin="0,5.656,10,5.656" HorizontalAlignment="Right" VerticalAlignment="Center"><Run Language="ro-ro" Text="Încarcă anexa1.xml"/></TextBlock>
			<Separator/>
			<TextBlock TextWrapping="Wrap" Margin="0,0,10,0" HorizontalAlignment="Right" VerticalAlignment="Center"><Run Language="ro-ro" Text="Autorizat"/></TextBlock>
			<TextBlock TextWrapping="Wrap" Margin="0,0,10,0" HorizontalAlignment="Right" VerticalAlignment="Center"><Run Language="ro-ro" Text="OCPI"/></TextBlock>
			<TextBlock TextWrapping="Wrap" Margin="0,0,10,0" HorizontalAlignment="Right" VerticalAlignment="Center"><Run Language="ro-ro" Text="BCPI"/></TextBlock>
			<TextBlock TextWrapping="Wrap" Margin="0,0,10,0" HorizontalAlignment="Right" VerticalAlignment="Center"><Run Language="ro-ro" Text="Denumire documentatie"/></TextBlock>
			<TextBlock TextWrapping="Wrap" Margin="0,0,10,0" HorizontalAlignment="Right" VerticalAlignment="Center"><Run Language="ro-ro" Text="UAT imobil"/></TextBlock>
			<TextBlock TextWrapping="Wrap" Margin="0,0,10,0" HorizontalAlignment="Right" VerticalAlignment="Center"><Run Language="ro-ro" Text="Adresa Imobil"/></TextBlock>
			<TextBlock TextWrapping="Wrap" Margin="0,0,10,0" HorizontalAlignment="Right" VerticalAlignment="Center"><Run Language="ro-ro" Text="Nume Proprietar"/></TextBlock>
			<TextBlock TextWrapping="Wrap" Margin="0,0,10,0" HorizontalAlignment="Right" VerticalAlignment="Center"><Run Language="ro-ro" Text="Termen de executie(zile)"/></TextBlock>
			<TextBlock TextWrapping="Wrap" Margin="0,0,10,0" HorizontalAlignment="Right" VerticalAlignment="Center"><Run Language="ro-ro" Text="Data inceperii lucrarii"/></TextBlock>
			<TextBlock TextWrapping="Wrap" Margin="0,0,10,0" HorizontalAlignment="Right" VerticalAlignment="Center"><Run Language="ro-ro" Text="Onorariu"/></TextBlock>
			<TextBlock TextWrapping="Wrap" Margin="0,0,10,0" HorizontalAlignment="Right" VerticalAlignment="Center"><Run Language="ro-ro" Text="Avans"/></TextBlock>
			<TextBlock TextWrapping="Wrap" Margin="0,0,10,0" HorizontalAlignment="Right" VerticalAlignment="Center"><Run Language="ro-ro" Text="Nr chitanță avans"/></TextBlock>
			<TextBlock TextWrapping="Wrap" Margin="0,0,10,0" HorizontalAlignment="Right" VerticalAlignment="Center"><Run Language="ro-ro" Text="Dată plată avans"/></TextBlock>
			<TextBlock TextWrapping="Wrap" Margin="0,0,10,0" HorizontalAlignment="Right" VerticalAlignment="Center"><Run Language="ro-ro" Text="Dată plată rest"/></TextBlock>
			<TextBlock TextWrapping="Wrap" Margin="0,0,10,0" HorizontalAlignment="Right" VerticalAlignment="Center"><Run Language="ro-ro" Text="Tip plată"/></TextBlock>
			<TextBlock TextWrapping="Wrap" Margin="0,0,10,0" HorizontalAlignment="Right" VerticalAlignment="Center"><Run Language="ro-ro" Text="Condiții plată"/></TextBlock>
			<TextBlock TextWrapping="Wrap" Margin="0,0,10,0" HorizontalAlignment="Right" VerticalAlignment="Center"><Run Language="ro-ro" Text="Nr de ordine"/></TextBlock>
			<TextBlock TextWrapping="Wrap" Margin="0,6.908,10,6.909" HorizontalAlignment="Right" VerticalAlignment="Center"><Run Language="ro-ro" Text="Alte clauze"/></TextBlock>
			<TextBlock TextWrapping="Wrap" Margin="0,7.809,10,7.809" HorizontalAlignment="Right" VerticalAlignment="Center"><Run Language="ro-ro" Text="Informatii Solicitate"/></TextBlock>
			<UniformGrid Rows="1" Margin="0,0,0,-3.818" Height="32" VerticalAlignment="Top" HorizontalAlignment="Left" Width="175.227" Columns="2">
				<Button Content="Imprimantă" Margin="4" Command="{Binding GenerateAnexaOutCommand}" CommandParameter="{Binding Content, RelativeSource={RelativeSource Self}}" VerticalAlignment="Center"/>
				<Button Content="Reset" Margin="4" Command="{Binding ResetModelCommand}" VerticalAlignment="Center"/>
			</UniformGrid>
		</UniformGrid>
		<UniformGrid Rows="{Binding Rows, ElementName=uniformGrid}" Grid.IsSharedSizeScope="True" Grid.Column="1" Margin="0" ClipToBounds="True">
			<Grid Margin="4">
				<TextBox TextWrapping="Wrap" Margin="0" IsReadOnly="True" Text="{Binding AnexaXMLSource, Mode=OneWay}"/>
				<Button Margin="0" HorizontalContentAlignment="Center" HorizontalAlignment="Right" Style="{Binding Mode=OneWay, Source={StaticResource SimpleButton}}" Command="{Binding SelectFileDialogCommand}">
					<Image Source="folder_Open_16xLG.png"/>
				</Button>
			</Grid>
			<Separator/>
			<ComboBox Margin="4" ItemsSource="{Binding Setari.lAutorizat}" SelectedItem="{Binding Anexa.Autorizat}" SelectedValue="{Binding Anexa.Autorizat.Nume}" SelectedValuePath="Nume" DisplayMemberPath="Nume"/>
			<ComboBox Margin="4" ItemsSource="{Binding Setari.lists.OCPI}" DisplayMemberPath="denumire" SelectedItem="{Binding Anexa.OCPI, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" SelectedValue="{Binding Anexa.OCPI.denumire}" SelectedValuePath="denumire">
				<i:Interaction.Triggers>
					<i:EventTrigger EventName="SelectionChanged">
						<i:InvokeCommandAction Command="{Binding UpdateUATImobilListCommand}"/>
					</i:EventTrigger>
				</i:Interaction.Triggers>
			</ComboBox>
			<ComboBox Margin="4" SelectedItem="{Binding Anexa.BCPI, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" SelectedValue="{Binding Anexa.BCPI.denumire}" ItemsSource="{Binding Anexa.OCPI.BCPI}" SelectedValuePath="denumire" DisplayMemberPath="denumire"/>
			<ComboBox Margin="4" ItemsSource="{Binding TipDocCadastrala.values}" SelectedItem="{Binding Anexa.docCadastrala, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
            <ComboBox Margin="4" ItemsSource="{Binding UATImobilList}" DisplayMemberPath="Denumire" SelectedItem="{Binding Anexa.Imobil.UAT, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" SelectedValue="{Binding Anexa.Imobil.UAT.Denumire}" SelectedValuePath="Denumire"/>
			<TextBox TextWrapping="Wrap" Margin="4" Text="{Binding Anexa.Imobil.Adresa.adresaIntreaga}"/>
			<TextBox TextWrapping="Wrap" Margin="4" Text="{Binding Anexa.proprietar.Nume, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
			<TextBox TextWrapping="Wrap" Margin="4" Text="{Binding Anexa.termenLucrare}"/>
			<xctk:DateTimeUpDown Margin="4" Format="ShortDate" Value="{Binding Anexa.startDate}"/>
			<TextBox TextWrapping="Wrap" Margin="4" Text="{Binding Anexa.onorariu, Mode=TwoWay, StringFormat=\{0:F\}, UpdateSourceTrigger=PropertyChanged}"/>
			<TextBox TextWrapping="Wrap" Margin="4" Text="{Binding Anexa.avans, Mode=TwoWay, StringFormat=\{0:F\}, UpdateSourceTrigger=PropertyChanged}"/>
			<TextBox TextWrapping="Wrap" Margin="4" Text="{Binding Anexa.chitanta.NrChitanta, Mode=TwoWay, StringFormat=\{0:D\}, UpdateSourceTrigger=PropertyChanged}"/>
			<xctk:DateTimeUpDown Margin="4" Format="ShortDate" Value="{Binding Anexa.chitanta.DataChitanta}"/>
			<xctk:DateTimeUpDown Margin="4" Format="ShortDate" Value="{Binding Anexa.DataPlata}"/>
			<ComboBox Margin="4" ItemsSource="{Binding TipPlata.values}" SelectedItem="{Binding Anexa.tipPlata, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
			<TextBox TextWrapping="Wrap" Margin="4" Text="{Binding Anexa.conditiiPlata, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
			<TextBox TextWrapping="Wrap" Margin="4" Text="{Binding Anexa.NrDeOrdineIntern, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
			<TextBox TextWrapping="Wrap" Margin="4" Text="{Binding Anexa.alteClauze, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
			<TextBox TextWrapping="Wrap" Margin="4" Text="{Binding Anexa.informatii, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
			<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
				<Button Content=".XML" Margin="10,4" VerticalAlignment="Center" ContentStringFormat="" Width="50" Command="{Binding ToXMLCommand}"/>
				<Button Content=".PDF" Margin="10,4" VerticalAlignment="Center" Width="50" Command="{Binding GenerateAnexaOutCommand}" CommandParameter="{Binding Content, RelativeSource={RelativeSource Self}}"/>
				<Button Content="Word" Margin="10,4" VerticalAlignment="Center" Width="50" Command="{Binding GenerateAnexaOutCommand}" CommandParameter="{Binding Content, RelativeSource={RelativeSource Self}}"/>
				
			</StackPanel>
		</UniformGrid>
	</Grid>
	</ScrollViewer>
</UserControl>
